package com.tanhua.server.utils;

import com.tanhua.domain.sound.SoundCount;
import com.tanhua.dubbo.api.SoundCountApi;
import com.tanhua.server.service.RemainingTimesJobService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author To my left is the dog
 * @date 2021/3/1 11:22
 */
@Component
public class RemainingTimesJob {
    @Autowired
    private RemainingTimesJobService remainingTimesJobService;

    @Scheduled(cron = "0 0 0 */1 * ?")
    //@Scheduled(cron = "0/10 * * * * ? ")
    public void SoundCount(){
        remainingTimesJobService.Sound();
        System.out.println("更新完成了");
    }
}
